<%@ tag language="java" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<%@ attribute name="replace" type="java.lang.String" required="true" description="需要替换的textarea编号"%>
<%@ attribute name="height" type="java.lang.String" required="false" description="编辑器高度"%>
<%@ attribute name="readonly" type="java.lang.String" required="false" description="编辑器只读"%>
<%@ attribute name="objectId" type="java.lang.String" required="true" description="上传附件或图片对象ID"%>
<%@ attribute name="objectType" type="java.lang.String" required="true" description="上传附件或图片对象类型"%>
<script type="text/javascript" >
	var kindeditor;
	KindEditor.ready(function(K) {
		kindeditor = K.create('textarea[name="${replace}"]', {
			allowFileManager : false,
			autoHeightMode : true,
			uploadJson: '${ctx}/basic/kindeditor/upload?objectId=${objectId}&objectType=${objectType}',
            extraFileUploadParams: {
                objectId: '${objectId}',
                objectType: '${objectType}'
            },
			afterCreate : function() {
				this.loadPlugin('autoheight');
			}
		});
	});
</script>